package com.dushibao.service.impl;

import com.dushibao.dao.UploadServerDao;
import com.dushibao.entity.Menu;
import com.dushibao.entity.UploadServer;
import com.dushibao.service.UploadServerService;
import com.dushibao.utils.Page;

import java.util.List;

public class UploadServerServiceImpl implements UploadServerService {
    UploadServerDao uploadServerDao = new UploadServerDao();

    @Override
    public Page page(Page page,String name,String address) {
        return uploadServerDao.page(page,name,address);
    }

    @Override
    public UploadServer getById(long id) {
        return uploadServerDao.getById(id);
    }

    @Override
    public Integer saveOrUpdate(UploadServer obj) {
        if(obj.getId()!=null){
            return uploadServerDao.update(obj);
        }

        return uploadServerDao.save(obj);
    }

    @Override
    public Integer deleteById(List<Long> ids) {
        return uploadServerDao.deleteById(ids);
    }
}
